/*
 * Created on 2006-7-5
 */
package entity;

public class Statistics {
	public int o2sMessages = 0;
	public int s2oProbeMessages = 0;
	public int s2oCanResultMsgs = 0;
	public int changedResult = 0;

	public long serverWorkLoad = 0;

	public int getTotalMsgs() {
		return o2sMessages + s2oProbeMessages + this.s2oCanResultMsgs;
	}

	public double getTotalMsgRate(int numTimeSteps) {
		return (double) getTotalMsgs() / numTimeSteps;
	}

	public double getServerMsgRate(int numTimePoints) {
		return (double) s2oProbeMessages / numTimePoints;
	}

	public double getTotalServerWorkLoadSec() {
		return this.serverWorkLoad / 1000.0;
	}

	public double getClientMsgRate(int numTimePoints, int numClients) {
		return (double) o2sMessages / numTimePoints / numClients;
	}

	public double getAVGResultChange(int numObj, int numTimePoints) {
		return (double) this.changedResult / numObj / numTimePoints;
	}
}
